<HTML>
<HEAD>
<TITLE>[Chapter 19] Container</TITLE>
<META NAME="author" CONTENT="John Zukowski">
<META NAME="date" CONTENT="Thu Jul 31 15:11:18 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java AWT">
<META NAME="title" CONTENT="Java AWT">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java AWT" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch19_15.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 19<br>java.awt Reference</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch19_17.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=refnamediv>
<H1>Container</H1>

<H2>Name</H2>

Container

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch19-REFSECT1-AUTOID.16"></A></h2>
</DIV>


<p>
<img align=middle src="./figs/contai5.gif" alt="[Graphic: Figure from the text]" width=502 height=142 border=0>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-1">Description</A></h2>

<P CLASS=para>
The <tt CLASS=literal>Container</tt> class serves 
as a general purpose holder of other <tt CLASS=literal>Component</tt> 
objects. 

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-2">Class Definition</A></h2>

<DIV CLASS=screen>
<P>
<PRE>
public abstract class java.awt.Container
    extends java.awt.Component {
  // Constructors
  protected Container(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  
  // Instance Methods
  public Component add (Component component);
  public Component add (Component component, int position);
  public void add (Component comp, Object constraints); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void add (Component comp, Object constraints, 
      int position); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public Component add (String name, Component component); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public void addContainerListener (ContainerListener l); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void addNotify();
  public int countComponents();
  public void deliverEvent (Event e); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void doLayout(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public float getAlignmentX(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public float getAlignmentY(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public Component getComponent (int n);
  public Component getComponentAt (int x, int y);  <img src="gifs/bstar.gif" alt="(New)" border=0>
  public Component getComponentAt (Point p);  <img src="gifs/bstar.gif" alt="(New)" border=0>
  public int getComponentCount(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public Component[] getComponents();
  public Insets getInsets(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public LayoutManager getLayout();
  public Dimension getMaximumSize(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public Dimension getMinimumSize();  <img src="gifs/bstar.gif" alt="(New)" border=0>
  public Dimension getPreferredSize();  <img src="gifs/bstar.gif" alt="(New)" border=0>
  public Insets insets();
  public void invalidate(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public boolean isAncestorOf (Component c); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void layout(); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public void list (PrintStream out, int indentation);
  public void list (PrintWriter out, int indentation); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public Component locate (int x, int y); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public Dimension minimumSize(); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public void paint (Graphics g); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void paintComponents (Graphics g);
  public Dimension preferredSize(); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public void print (Graphics g); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void printComponents (Graphics g);
  public void remove (int index); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void remove (Component component);
  public void removeAll();
  public void removeContainerListener (ContainerListener l); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void removeNotify();
  public void setLayout (LayoutManager manager);
  public void validate();
  // Protected Instance Methods
  protected void addImpl (Component comp, Object constraints, 
      int index); <img src="gifs/bstar.gif" alt="(New)" border=0>
  protected String paramString();
  protected void processContainerEvent (ContainerEvent e); <img src="gifs/bstar.gif" alt="(New)" border=0>
  protected void processEvent (AWTEvent e); <img src="gifs/bstar.gif" alt="(New)" border=0>
  protected void validateTree(); <img src="gifs/bstar.gif" alt="(New)" border=0>
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-3">Constructors</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-3.1">Container</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-3.1.1">protected Container() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This constructor creates a "lightweight" container. This constructor 
allows <tt CLASS=literal>Container</tt> to be subclassed using code written entirely in Java. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4">Instance Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.1">add</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.1.1">public Component add (Component component)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>component</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> 
to add to container. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> just added. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>IllegalArgumentException</tt> if you
add <tt CLASS=literal>component</tt> to itself. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Adds <tt CLASS=literal>component</tt> as the last 
component in the container. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.1.2">public Component add (Component component, int position)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>component</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> 
to add to container. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>position</I><br>
<DD>

<P CLASS=para>
Position of component; -1 adds the component as the last 
in the container. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component just added.</tt> 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>ArrayIndexOutOfBoundsException</tt><br>
<DD>

<P CLASS=para>
If 
<tt CLASS=literal>position</tt> invalid. 

<p>
<DT CLASS=varlistentry><tt CLASS=literal>IllegalArgumentException</tt><br>
<DD>

<P CLASS=para>
If 
you add <tt CLASS=literal>Component</tt> to itself. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Adds <tt CLASS=literal>component</tt> to container 
at a certain position. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.1.3">public void add (Component component, Object constraints) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>component</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> 
to add to container. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>constraints</I><br>
<DD>

<P CLASS=para>
An object describing constraints on the component being 
added. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Adds <tt CLASS=literal>component</tt> to container 
subject to <tt CLASS=literal>contraints</tt>. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.1.4">public void add (Component component, Object constraints, int index) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>component</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> 
to add to container. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>constraints</I><br>
<DD>

<P CLASS=para>
An object describing constraints on the component being 
added. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>index</I><br>
<DD>

<P CLASS=para>
The position of the component in the container's 
list. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Adds <tt CLASS=literal>component</tt> to container 
subject to <tt CLASS=literal>contraints</tt> at position 
<tt CLASS=literal>index</tt>. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.1.5">public Component add (String name, Component component) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>name</I><br>
<DD>

<P CLASS=para>
Name of component being added. This parameter is often 
significant to the layout manager of the container (e.g "North", 
"Center"). 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>component</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> 
to add to container. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> just added. 

<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>IllegalArgumentException</I><br>
<DD>

<P CLASS=para>
If 
you add <tt CLASS=literal>component</tt> 
to itself. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Adds the component to the container with the given <tt CLASS=literal>name</tt>. 
Replaced by the more general <tt CLASS=literal>add(Component, Object)</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.2">addContainerListener</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.2.1">public void addContainerListener (ContainerListener l) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>l</I><br>
<DD>

<P CLASS=para>
An object that implements the <tt CLASS=literal>ContainerListener</tt> 
interface. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Add a listener for the container events. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.3">addNotify</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.3.1">public void addNotify()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.addNotify()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Creates <tt CLASS=literal>Container</tt>'s peer and 
peers of contained components. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.4">countComponents</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.4.1">public int countComponents()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Number of components within <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.5">deliverEvent</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.5.1">public void deliverEvent (Event e) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>e</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Event</tt> instance 
to deliver. </DL>
<p>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.deliverEvent(Event)</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Tries to locate the component contained in the container that should receive 
the event. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.6">doLayout</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.6.1">public void doLayout() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Lays out the container. This method is a replacement for <tt CLASS=literal>layout()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.7">getAlignmentX</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.7.1">public float getAlignmentX() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
A number between 0 and 1 representing the horizontal alignment of this 
component. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.getAlignmentX()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
If the container's layout manager implements <tt CLASS=literal>LayoutManager2</tt>, 
this method returns the <tt CLASS=literal>getLayoutAlignmentX()</tt> 
value of the layout manager. Otherwise the <tt CLASS=literal>getAlignmentX()</tt> 
value of <tt CLASS=literal>Component</tt> is returned. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.8">getAlignmentY</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.8.1">public float getAlignmentY() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
A number between 0 and 1 representing the vertical alignment of this component. 

<p>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.getAlignmentY()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
If the container's layout manager implements <tt CLASS=literal>LayoutManager2</tt>, 
this method returns the <tt CLASS=literal>getLayoutAlignmentY()</tt> 
value of the layout manager. Otherwise the <tt CLASS=literal>getAlignmentY()</tt> 
value of <tt CLASS=literal>Component</tt> is returned. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.9">getComponent</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.9.1">public synchronized Component getComponent (int position)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>position</I><br>
<DD>

<P CLASS=para>
Position of component to get. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><tt CLASS=literal>ArrayIndexOutOfBoundsException</tt><br>
<DD>

<P CLASS=para>
If 
<tt CLASS=literal>position</tt> is invalid. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> at designated <tt CLASS=literal>position</tt> 
within <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.10">getComponentAt</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.10.1">public Component getComponentAt (int x, int y) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
The x coordinate, in this <tt CLASS=literal>Container</tt>'s 
coordinate system. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
The y coordinate, in this <tt CLASS=literal>Container</tt>'s 
coordinate system. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Returns the <tt CLASS=literal>Component</tt> containing 
the give point. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.10.2">public Component getComponentAt (Point p) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>p</I><br>
<DD>

<P CLASS=para>
The point to be tested, in this <tt CLASS=literal>Container</tt>'s 
coordinate system. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Returns the <tt CLASS=literal>Component</tt> containing 
the give point. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.11">getComponentCount</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.11.1">public int getComponentCount() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Returns the number of components in the container. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.12">getComponents</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.12.1">public Component[] getComponents()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Array of components within the container. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.13">getInsets</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.13.1">public Insets getInsets()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The insets of the container. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.14">getLayout</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.14.1">public LayoutManager getLayout()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>LayoutManager</tt> of <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.15">getMaximumSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.15.1">public Dimension getMaximumSize() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.getMaximumSize()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The maximum dimensions of the component. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.16">getMinimumSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.16.1">public Dimension getMinimumSize() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.getMinimumSize()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The minimum dimensions of the component. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.17">getPreferredSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.17.1">public Dimension getPreferredSize() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The preferred dimensions of the component. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.18">insets</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.18.1">public Insets insets() <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Current <tt CLASS=literal>Insets</tt> of <tt CLASS=literal>Container</tt>. 
Replaced by <tt CLASS=literal>getInsets()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.19">invalidate</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.19.1">public void invalidate()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.invalidate()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Sets the container's valid state to <tt CLASS=literal>false</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.20">isAncestorOf</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.20.1">public boolean isAncestorOf (Component c) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>c</I><br>
<DD>

<P CLASS=para>
The component in question. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
If <tt CLASS=literal>c</tt> is contained in the container's 
hierarchy, returns <tt CLASS=literal>true</tt>; otherwise 
<tt CLASS=literal>false</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.21">layout</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.21.1">public void layout() <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.layout()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Replaced by <tt CLASS=literal>doLayout()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.22">list</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.22.1">public void list (PrintStream out, int indentation)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>out</I><br>
<DD>

<P CLASS=para>
Output <tt CLASS=literal>Stream</tt> 
to send results to. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>indentation</I><br>
<DD>

<P CLASS=para>
Indentation to use when printing. </DL>
<p>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.list(PrintStream, 
int)</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Recursively lists all components in <tt CLASS=literal>Container</tt>. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.22.2">public void list (PrintWriter out, int indentation)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>out</I><br>
<DD>

<P CLASS=para>
Output <tt CLASS=literal>Writer</tt> 
to send results to. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>indentation</I><br>
<DD>

<P CLASS=para>
Indentation to use when printing. </DL>
<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.list(PrintWriter, 
int)</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Recursively lists all components in <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.23">locate</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.23.1">public Component locate (int x, int y) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
Horizontal position to check. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
Vertical position to check. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> within <tt CLASS=literal>Container</tt> 
at given coordinates, or <tt CLASS=literal>Container</tt>. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.locate(int, int)</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Replaced by <tt CLASS=literal>getComponentAt(int, int)</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.24">minimizeSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.24.1">public Dimension minimumSize() <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Minimum dimensions of contained objects. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.minimumSize()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Replaced by <tt CLASS=literal>getMinimumSize()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.25">paint</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.25.1">public void paint (Graphics g)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>g</I><br>
<DD>

<P CLASS=para>
Graphics context of container. </DL>
<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.paint()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method tells any lightweight components that are children of this 
container to paint themselves. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.26">paintComponents</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.26.1">public void paintComponents (Graphics g)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>g</I><br>
<DD>

<P CLASS=para>
Graphics context of <tt CLASS=literal>Container</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Paints the different components in <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.27">preferredSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.27.1">public Dimension preferredSize() <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Preferred dimensions of contained objects. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.preferredSize()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Replaced by <tt CLASS=literal>getPreferredSize()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.28">print</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.28.1">public void print (Graphics g)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>g</I><br>
<DD>

<P CLASS=para>
Graphics context of container. </DL>
<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.print()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method tells any lightweight components that are children of this 
container to print themselves. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.29">printComponents</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.29.1">public void printComponents (Graphics g)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>g</I><br>
<DD>

<P CLASS=para>
Graphics context of <tt CLASS=literal>Container</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Prints the different components in <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.30">remove</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.30.1">public void remove (int index) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>index</I><br>
<DD>

<P CLASS=para>
Index of the component to remove. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Removes the component in position <tt CLASS=literal>index</tt> 
from <tt CLASS=literal>Container</tt>. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.30.2">public void remove (Component component)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>component</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component</tt> 
to remove. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Removes <tt CLASS=literal>component</tt> from <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.31">removeAll</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.31.1">public void removeAll()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Removes all components from <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.32">removeContainerListener</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.32.1">public void removeContainerListener (ContainerListener l) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>l</I><br>
<DD>

<P CLASS=para>
One of this <tt CLASS=literal>Container</tt>'s 
<tt CLASS=literal>ContainerListener</tt>s. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Remove a container event listener. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.33">removeNotify</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.33.1">public void removeNotify()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.removeNotify()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Removes <tt CLASS=literal>Container</tt>'s peer and 
peers of contained components. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.34">setLayout</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.34.1">public void setLayout (LayoutManager manager)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>manager</I><br>
<DD>

<P CLASS=para>
New <tt CLASS=literal>LayoutManager</tt> 
for <tt CLASS=literal>Container</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes <tt CLASS=literal>LayoutManager</tt> of <tt CLASS=literal>Container</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.35">validate</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-4.35.1">public void validate()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.validate()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Sets <tt CLASS=literal>Container</tt>'s valid 
state to <tt CLASS=literal>true</tt> and recursively 
validates its children. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5">Protected Instance Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.1">addImpl</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.1.1">protected void addImpl (Component comp, Object constraints, int index) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>comp</I><br>
<DD>

<P CLASS=para>
The component to add. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>constraints</I><br>
<DD>

<P CLASS=para>
Constraints on the component. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>index</I><br>
<DD>

<P CLASS=para>
Position at which to add this component. Pass -1 to add 
the component at the end. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
This method adds a component subject to the given constraints at a specific 
position in the container's list of components. It is a helper method 
for the various overrides of <tt CLASS=literal>add()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.2">paramString</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.2.1">protected String paramString()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
String with current settings of <tt CLASS=literal>Container</tt>. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.paramString()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Helper method for <tt CLASS=literal>toString()</tt> 
to generate string of current settings. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.3">processContainerEvent</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.3.1">protected void processContainerEvent (ContainerEvent e) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>e</I><br>
<DD>

<P CLASS=para>
The event to process. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Container events are passed to this method for processing. Normally, this 
method is called by <tt CLASS=literal>processEvent()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.4">processEvent</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.4.1">protected void processEvent (AWTEvent e) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>e</I><br>
<DD>

<P CLASS=para>
The event to process. </DL>
<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.processEvent()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Low level <tt CLASS=literal>AWTEvent</tt>s are passed 
to this method for processing. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.5">validateTree</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-5.5.1">protected void validateTree() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Descends recursively into the <tt CLASS=literal>Container</tt>'s 
components and recalculates layout for any subtrees that are marked invalid. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-CONTAINER-SECT-6">See Also</A></h2>

<P CLASS=para>
<tt CLASS=literal>Component</tt>, <tt CLASS=literal>Dimension</tt>, 
<tt CLASS=literal>Event</tt>, <tt CLASS=literal>Graphics</tt>, 
<tt CLASS=literal>Insets</tt>, <tt CLASS=literal>LayoutManager</tt>, 
<tt CLASS=literal>Panel</tt>, <tt CLASS=literal>PrintStream</tt>, 
<tt CLASS=literal>String</tt>, <tt CLASS=literal>Window</tt>

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch19_15.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch19_17.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>Component</td>
<td width=171 align=center valign=top><a href="index/idx_a.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>Cursor <img src="gifs/bstar.gif" alt="(New)" border=0></td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
